﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SpiceNet.Models;

namespace SpiceNet.Diagnostics
{
    /// <summary>
    /// Exception called when a model is incorrect
    /// </summary>
    [Serializable]
    public class InvalidModelException : CircuitException
    {
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="model"></param>
        public InvalidModelException(Model model)
            : base(String.Format("{0} is an invalid model.", model.Name))
        {

        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="model"></param>
        /// <param name="inst"></param>
        public InvalidModelException(Model model, Instance inst)
            : base(String.Format("{0}: Invalid model {1} specified.", inst.Name, model.Name))
        {

        }
    }
}
